import styles from "./index.module.less";
import ProblemPlayground from "./component/problem_playground";
import {
  GPUAssignments,
  balancedString,
  basketballMatch,
  cacheVisit,
  constantNaturalNumber,
  deDuplicationAndSort,
  eatPeaches,
  findCheaters,
  findConstantArea,
  findFriends,
  findLongestO,
  findMiddleNum,
  findSeats,
  generateSpecificString,
  jointPrefixAndSuffix,
  lowestUnitSort,
  parkingLot,
  scheduleCourse,
  sortedByHeightAndWeight,
  sushi,
  switchString,
  takeTaxi,
  validatePwd,
  vowelString,
  wordsAssociation,
} from "./huawei_test_C";

const LeetCodeII = () => {
  return (
    <div className={styles.container}>
      <ProblemPlayground
        input={[1, 1, 0, 1, 1, 1, 1, 1, 0, 1]}
        title={"停车"}
        func={parkingLot}
      />
      <ProblemPlayground
        input={20}
        input2={[2, 4, 6, 8, 10, 12, 14, 16]}
        title={"连续区间"}
        func={findConstantArea}
      />
      <ProblemPlayground
        input={"/abc"}
        input2={"/bcd"}
        title={"连接前后缀"}
        func={jointPrefixAndSuffix}
      />
      <ProblemPlayground
        input={"The furthest distance in the world"}
        input2={"f"}
        title={"单词联想"}
        func={wordsAssociation}
      />
      <ProblemPlayground
        input={3}
        input2={[1, 2, 3, 4, 5]}
        title={"GPU算力"}
        func={GPUAssignments}
      />
      <ProblemPlayground
        input={"abacaba"}
        title={"调换字符顺序"}
        func={switchString}
      />
      <ProblemPlayground
        input={[100, 100, 120, 130]}
        input2={[40, 30, 60, 50]}
        title={"体重身高排序"}
        func={sortedByHeightAndWeight}
      />
      <ProblemPlayground
        input={[1, 3, 3, 3, 2, 4, 4, 4, 5]}
        title={"去重排序"}
        func={deDuplicationAndSort}
      />
      <ProblemPlayground
        input={[1, 2, 5, -21, 22, 11, 55, -101, 42, 8, 7, 32]}
        title={"最低位排序"}
        func={lowestUnitSort}
      />
      <ProblemPlayground
        input={[1, 2, 1, 2, 1, 2, 1, 2, 1, 2]}
        input2={5}
        title={"内存"}
        func={cacheVisit}
      />
      <ProblemPlayground
        input={"XXYYXYYX"}
        title={"平衡字符串"}
        func={balancedString}
      />
      <ProblemPlayground
        input={"looxdolx"}
        title={"找到最长的o环"}
        func={findLongestO}
      />
      <ProblemPlayground
        input={[
          [1, 300],
          [2, 300],
          [3, 300],
        ]}
        title={"找出作弊的人"}
        func={findCheaters}
      />
      <ProblemPlayground
        input={[3, 15, 6, 14]}
        title={"回转寿司"}
        func={sushi}
      />

      <ProblemPlayground input={"10001"} title={"找座位"} func={findSeats} />
      <ProblemPlayground
        input={9}
        title={"连续自然数"}
        func={constantNaturalNumber}
      />
      <ProblemPlayground
        input={[
          [100, 200],
          [200, 1300],
          [1000, 1250],
          [2000, 3200],
        ]}
        title={"LeetCode630 课程表III"}
        func={scheduleCourse}
      />
      <ProblemPlayground title={"HJ20 密码验证处理"} func={validatePwd} />
      <ProblemPlayground
        input={[10, 20, 30, 40, 50, 60, 70, 80, 90, 100]}
        title={"查找众数及中位数"}
        func={findMiddleNum}
      />
      <ProblemPlayground
        input={[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]}
        title={"篮球比赛"}
        func={basketballMatch}
      />
      <ProblemPlayground
        input={[123, 124, 125, 121, 119, 122, 126, 123]}
        title={"找朋友"}
        func={findFriends}
      />
      <ProblemPlayground input={100} title={"出租车"} func={takeTaxi} />
      <ProblemPlayground
        input={[1000, 2000, 3000, 4000, 5000]}
        input2={20}
        title={"猴子吃桃"}
        func={eatPeaches}
      />
      <ProblemPlayground
        input={"aab"}
        input2={2}
        title={"构成指定字符串长度"}
        func={generateSpecificString}
      />
      <ProblemPlayground
        input={0}
        input2={"asdbuiodevauufgh"}
        title={"构成指定字符串长度"}
        func={vowelString}
      />
    </div>
  );
};

export default LeetCodeII;
